.class Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;
.super Ljava/util/Timer;
.source "RhythmLayout.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/brixd/niceapp/control/RhythmLayout;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x0
    name = "ShiftRhythmMonitorTimer"
.end annotation


# instance fields
.field private final CHECK_TIME_INTERVAL:I

.field private canShift:Z

.field private mTimerTask:Ljava/util/TimerTask;

.field final synthetic this$0:Lcom/brixd/niceapp/control/RhythmLayout;

.field x:F

.field y:F


# direct methods
.method public constructor <init>(Lcom/brixd/niceapp/control/RhythmLayout;)V
    .registers 3
    .param p1, "this$0"    # Lcom/brixd/niceapp/control/RhythmLayout;

    .prologue
    .line 415
    iput-object p1, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->this$0:Lcom/brixd/niceapp/control/RhythmLayout;

    invoke-direct {p0}, Ljava/util/Timer;-><init>()V

    .line 410
    const/16 v0, 0xc8

    iput v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->CHECK_TIME_INTERVAL:I

    .line 412
    const/4 v0, 0x1

    iput-boolean v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->canShift:Z

    .line 416
    const/high16 v0, -0x40800000

    iput v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->y:F

    iput v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->x:F

    .line 417
    return-void
.end method

.method static synthetic access$200(Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;)Z
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;

    .prologue
    .line 408
    iget-boolean v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->canShift:Z

    return v0
.end method

.method static synthetic access$202(Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;Z)Z
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;
    .param p1, "x1"    # Z

    .prologue
    .line 408
    iput-boolean p1, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->canShift:Z

    return p1
.end method


# virtual methods
.method monitorTouchPosition(FF)V
    .registers 6
    .param p1, "x"    # F
    .param p2, "y"    # F

    .prologue
    const/4 v2, 0x0

    .line 429
    iput p1, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->x:F

    .line 430
    iput p2, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->y:F

    .line 431
    cmpg-float v0, p1, v2

    if-ltz v0, :cond_22

    sget v0, Lcom/brixd/niceapp/control/RhythmLayout;->mEdgeSizeForShiftRhythm:I

    int-to-float v0, v0

    cmpl-float v0, p1, v0

    if-gtz v0, :cond_22

    iget-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->this$0:Lcom/brixd/niceapp/control/RhythmLayout;

    # getter for: Lcom/brixd/niceapp/control/RhythmLayout;->screenWidth:I
    invoke-static {v0}, Lcom/brixd/niceapp/control/RhythmLayout;->access$100(Lcom/brixd/niceapp/control/RhythmLayout;)I

    move-result v0

    sget v1, Lcom/brixd/niceapp/control/RhythmLayout;->mEdgeSizeForShiftRhythm:I

    sub-int/2addr v0, v1

    int-to-float v0, v0

    cmpg-float v0, p1, v0

    if-ltz v0, :cond_22

    cmpg-float v0, p2, v2

    if-gez v0, :cond_25

    .line 432
    :cond_22
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->canShift:Z

    .line 434
    :cond_25
    return-void
.end method

.method reset()V
    .registers 2

    .prologue
    .line 420
    const/high16 v0, -0x40800000

    iput v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->y:F

    iput v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->x:F

    .line 421
    iget-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->mTimerTask:Ljava/util/TimerTask;

    if-eqz v0, :cond_12

    .line 422
    iget-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->mTimerTask:Ljava/util/TimerTask;

    invoke-virtual {v0}, Ljava/util/TimerTask;->cancel()Z

    .line 423
    const/4 v0, 0x0

    iput-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->mTimerTask:Ljava/util/TimerTask;

    .line 425
    :cond_12
    invoke-virtual {p0}, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->cancel()V

    .line 426
    return-void
.end method

.method startMonitor()V
    .registers 7

    .prologue
    const-wide/16 v2, 0xc8

    .line 437
    iget-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->mTimerTask:Ljava/util/TimerTask;

    if-nez v0, :cond_14

    .line 438
    new-instance v0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer$1;

    invoke-direct {v0, p0}, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer$1;-><init>(Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;)V

    iput-object v0, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->mTimerTask:Ljava/util/TimerTask;

    .line 492
    iget-object v1, p0, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->mTimerTask:Ljava/util/TimerTask;

    move-object v0, p0

    move-wide v4, v2

    invoke-virtual/range {v0 .. v5}, Lcom/brixd/niceapp/control/RhythmLayout$ShiftRhythmMonitorTimer;->schedule(Ljava/util/TimerTask;JJ)V

    .line 493
    :cond_14
    return-void
.end method
